Skip to content

Conversation

@jzunigax2
Copy link

  • Updated the Temporary method to include additional status codes (408, 429) for temporary errors.
  • Added RetryAfter method to calculate wait time based on rate limit headers in the response.

- Updated the Temporary method to include additional status codes (408, 429) for temporary errors.
- Added RetryAfter method to calculate wait time based on rate limit headers in the response.
@jzunigax2 jzunigax2 requested a review from larryrider February 10, 2026 04:45
@jzunigax2 jzunigax2 self-assigned this Feb 10, 2026
- Introduced comprehensive tests for the RetryAfter method in the HTTPError struct, covering various scenarios including valid seconds, HTTP date formats, absence of headers, and invalid values.
- Added tests to ensure correct behavior for temporary errors (HTTP status codes 408 and 429) in the GetUsage and GetLimit functions, verifying that they return the expected HTTPError instances.
@jzunigax2 jzunigax2 marked this pull request as ready for review February 13, 2026 02:55
@jzunigax2 jzunigax2 merged commit 6f59c89 into master Feb 13, 2026
2 checks passed
@jzunigax2 jzunigax2 deleted the fix/add-http-codes-to-should-retry-and-add-retry-after branch February 13, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants